package com.cy.pj.projects.controller;

import com.cy.pj.projects.pojo.PortalTypeVO;
import com.cy.pj.projects.service.PortalTypeService;
import com.cy.pj.common.vo.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*
 * 控制层;
 * */
@RestController
@RequestMapping("/portaltype/")
public class PortalTypeController {
    @Autowired
    private PortalTypeService portalTypeService;

    // http://localhost/portaltype/doGetPortalTypeDataObjects
    //1.查询分类数据;
    @RequestMapping("doGetPortalTypeDataObjects")
    public JsonResult doGetPortalTypeDataObjects() {
        List<PortalTypeVO> List = portalTypeService.getPortalTypeVO();
        return new JsonResult(List);
    }
}
